package com.thinkingstar.iads.cs.sys.entity;


import java.util.List;
import java.util.Hashtable;
import org.nutz.dao.entity.annotation.*;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author steelwoo.cn
 * @time 2012-9-13 上午10:54:04
 * 
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table("dc_sys_user")
@TableIndexes({@Index(name = "INDEX_LONGINNAME", fields = {"loginname"}, unique = false)})
public class SysUser {
	
	@Column
	@Id
	private long id;
	
	@Column
	@Name
    @ColDefine(type = ColType.VARCHAR, width = 120)
	private String loginname;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
	private String realname;
	@Column
	@ColDefine(type = ColType.VARCHAR, width = 18)
	private String idCard;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
	private String unitid;
	
	@Column
	@ColDefine(type=ColType.VARCHAR,width=100)
	private String majorid;
	
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 50)
	private String password;// transient 修饰符可让此字段不在对象里显示
    @Column
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String salt;
	@Column
    @ColDefine(type = ColType.INT, width = 1)
	private int state;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String descript;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String position;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String address;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String telephone;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 11)
    private String mobile;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String email;
	@Column
    @ColDefine(type = ColType.INT)
    private int location;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String style;
	@Column
    @ColDefine(type = ColType.INT)
    private int logintype;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String logintime;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 50)
	private String loginip;
	@Column
    @ColDefine(type = ColType.INT)
    private int logincount;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String loginresid;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String linkqq;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String linkweb;
	@Column
    @ColDefine(type = ColType.VARCHAR, width =100)
    private String linkcity;
	@Column
    @ColDefine(type = ColType.CHAR, width =1)
    private String sex;
	
	@Column
    @ColDefine(type = ColType.VARCHAR, width =20)
    private String job_number;
	
	@Column
    @ColDefine(type = ColType.INT, width =1)
    private String is_delete;
	
	@Column
    @ColDefine(type = ColType.INT, width =1)
    private String is_available;
	
	/**
	 * 用户身份
	 * 1 管理员  0 普通用户  9 游客
	 * */
	@Column
    @ColDefine(type = ColType.INT, width =1)
    private String user_identity;
	
	private String unitname;

	// 是否超级管理员角色
	private boolean sysrole;

	private List<Integer> rolelist; //角色集合
    private List<Integer> majorList;  //用户所属专业集合
	private List<String> reslist; //一级菜单资源集合

	private Hashtable<String, String> btnmap;

	public String getUnitname() {
		return unitname;
	}

	public void setUnitname(String unitname) {
		this.unitname = unitname;
	}

	public boolean getSysrole() {
		return sysrole;
	}

	public void setSysrole(boolean sysrole) {
		this.sysrole = sysrole;
	}
}
